package com.rest.demo.functional.time;

import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.temporal.ChronoUnit;

/**
 * @author Administrator
 * @decription
 * @Date 2018-01-29 14:35
 */
public class LocalTimeDemo {

    public static void main(String[] args) {
        LocalTime localDateTime = LocalTime.now();
        System.out.println(localDateTime);

        LocalTime localDateTime1 = LocalTime.parse("15:02:23");
        System.out.println(localDateTime1);

        LocalTime nextHour = localDateTime1.plus(1, ChronoUnit.HOURS);
        System.out.println(nextHour);

        boolean isBefore = LocalTime.now().isBefore(LocalTime.parse("15:00:00"));
        System.out.println(isBefore);

        System.out.println(LocalTime.MAX);
        System.out.println(LocalTime.MIN);
    }
}
